package com.example.smartmallserver.demos.web.mapper;

import com.example.smartmallserver.demos.web.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.Mapping;

@Mapper
public interface LoginMapper {
    @Select("select * from smartmail.user where tel = ${tel}")
    User select(String tel);
    @Insert("insert into smartmail.user(tel) values (${tel})")
    void add(User user);

    @Select("select * from smartmail.user where id = ${id}")
    User selectById(Object id);
}
